package com.heshequexpresscab;

import android.os.Bundle;
import android.view.KeyEvent;

import com.facebook.react.ReactActivity;

import org.devio.rn.splashscreen.SplashScreen;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "heshequexpresscab";
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        SplashScreen.show(this);
        super.onCreate(savedInstanceState);
    }

    public boolean onKeyDown(int keycode, KeyEvent event) {
	  if (keycode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
	   // 右键处理
		moveTaskToBack(true); } 
	  return true;
	}

}
